22 research outputs found

    Additive Spanners: A Simple Construction

    Full text link
    We consider additive spanners of unweighted undirected graphs. Let GG be a graph and HH a subgraph of GG. The most na\"ive way to construct an additive kk-spanner of GG is the following: As long as HH is not an additive kk-spanner repeat: Find a pair (u,v)H(u,v) \in H that violates the spanner-condition and a shortest path from uu to vv in GG. Add the edges of this path to HH. We show that, with a very simple initial graph HH, this na\"ive method gives additive 66- and 22-spanners of sizes matching the best known upper bounds. For additive 22-spanners we start with H=H=\emptyset and end with O(n3/2)O(n^{3/2}) edges in the spanner. For additive 66-spanners we start with HH containing n1/3\lfloor n^{1/3} \rfloor arbitrary edges incident to each node and end with a spanner of size O(n4/3)O(n^{4/3}).Comment: To appear at proceedings of the 14th Scandinavian Symposium and Workshop on Algorithm Theory (SWAT 2014

    Linear Hashing is Awesome

    Full text link
    We consider the hash function h(x)=((ax+b)modp)modnh(x) = ((ax+b) \bmod p) \bmod n where a,ba,b are chosen uniformly at random from {0,1,,p1}\{0,1,\ldots,p-1\}. We prove that when we use h(x)h(x) in hashing with chaining to insert nn elements into a table of size nn the expected length of the longest chain is O~ ⁣(n1/3)\tilde{O}\!\left(n^{1/3}\right). The proof also generalises to give the same bound when we use the multiply-shift hash function by Dietzfelbinger et al. [Journal of Algorithms 1997].Comment: A preliminary version appeared at FOCS'1

    The Entropy of Backwards Analysis

    Full text link
    Backwards analysis, first popularized by Seidel, is often the simplest most elegant way of analyzing a randomized algorithm. It applies to incremental algorithms where elements are added incrementally, following some random permutation, e.g., incremental Delauney triangulation of a pointset, where points are added one by one, and where we always maintain the Delauney triangulation of the points added thus far. For backwards analysis, we think of the permutation as generated backwards, implying that the iith point in the permutation is picked uniformly at random from the ii points not picked yet in the backwards direction. Backwards analysis has also been applied elegantly by Chan to the randomized linear time minimum spanning tree algorithm of Karger, Klein, and Tarjan. The question considered in this paper is how much randomness we need in order to trust the expected bounds obtained using backwards analysis, exactly and approximately. For the exact case, it turns out that a random permutation works if and only if it is minwise, that is, for any given subset, each element has the same chance of being first. Minwise permutations are known to have Θ(n)\Theta(n) entropy, and this is then also what we need for exact backwards analysis. However, when it comes to approximation, the two concepts diverge dramatically. To get backwards analysis to hold within a factor α\alpha, the random permutation needs entropy Ω(n/α)\Omega(n/\alpha). This contrasts with minwise permutations, where it is known that a 1+ε1+\varepsilon approximation only needs Θ(log(n/ε))\Theta(\log (n/\varepsilon)) entropy. Our negative result for backwards analysis essentially shows that it is as abstract as any analysis based on full randomness

    Finding Even Cycles Faster via Capped k-Walks

    Full text link
    In this paper, we consider the problem of finding a cycle of length 2k2k (a C2kC_{2k}) in an undirected graph GG with nn nodes and mm edges for constant k2k\ge2. A classic result by Bondy and Simonovits [J.Comb.Th.'74] implies that if m100kn1+1/km \ge100k n^{1+1/k}, then GG contains a C2kC_{2k}, further implying that one needs to consider only graphs with m=O(n1+1/k)m = O(n^{1+1/k}). Previously the best known algorithms were an O(n2)O(n^2) algorithm due to Yuster and Zwick [J.Disc.Math'97] as well as a O(m2(1+k/21)/(k+1))O(m^{2-(1+\lceil k/2\rceil^{-1})/(k+1)}) algorithm by Alon et al. [Algorithmica'97]. We present an algorithm that uses O(m2k/(k+1))O(m^{2k/(k+1)}) time and finds a C2kC_{2k} if one exists. This bound is O(n2)O(n^2) exactly when m=Θ(n1+1/k)m=\Theta(n^{1+1/k}). For 44-cycles our new bound coincides with Alon et al., while for every k>2k>2 our bound yields a polynomial improvement in mm. Yuster and Zwick noted that it is "plausible to conjecture that O(n2)O(n^2) is the best possible bound in terms of nn". We show "conditional optimality": if this hypothesis holds then our O(m2k/(k+1))O(m^{2k/(k+1)}) algorithm is tight as well. Furthermore, a folklore reduction implies that no combinatorial algorithm can determine if a graph contains a 66-cycle in time O(m3/2ϵ)O(m^{3/2-\epsilon}) for any ϵ>0\epsilon>0 under the widely believed combinatorial BMM conjecture. Coupled with our main result, this gives tight bounds for finding 66-cycles combinatorially and also separates the complexity of finding 44- and 66-cycles giving evidence that the exponent of mm in the running time should indeed increase with kk. The key ingredient in our algorithm is a new notion of capped kk-walks, which are walks of length kk that visit only nodes according to a fixed ordering. Our main technical contribution is an involved analysis proving several properties of such walks which may be of independent interest.Comment: To appear at STOC'1

    Fast Similarity Sketching

    Full text link
    We consider the Similarity Sketching problem: Given a universe [u]={0,,u1}[u]= \{0,\ldots,u-1\} we want a random function SS mapping subsets A[u]A\subseteq [u] into vectors S(A)S(A) of size tt, such that similarity is preserved. More precisely: Given sets A,B[u]A,B\subseteq [u], define Xi=[S(A)[i]=S(B)[i]]X_i=[S(A)[i]= S(B)[i]] and X=i[t]XiX=\sum_{i\in [t]}X_i. We want to have E[X]=tJ(A,B)E[X]=t\cdot J(A,B), where J(A,B)=AB/ABJ(A,B)=|A\cap B|/|A\cup B| and furthermore to have strong concentration guarantees (i.e. Chernoff-style bounds) for XX. This is a fundamental problem which has found numerous applications in data mining, large-scale classification, computer vision, similarity search, etc. via the classic MinHash algorithm. The vectors S(A)S(A) are also called sketches. The seminal t×t\timesMinHash algorithm uses tt random hash functions h1,,hth_1,\ldots, h_t, and stores (minaAh1(A),,minaAht(A))\left(\min_{a\in A}h_1(A),\ldots, \min_{a\in A}h_t(A)\right) as the sketch of AA. The main drawback of MinHash is, however, its O(tA)O(t\cdot |A|) running time, and finding a sketch with similar properties and faster running time has been the subject of several papers. Addressing this, Li et al. [NIPS'12] introduced one permutation hashing (OPH), which creates a sketch of size tt in O(t+A)O(t + |A|) time, but with the drawback that possibly some of the tt entries are "empty" when A=O(t)|A| = O(t). One could argue that sketching is not necessary in this case, however the desire in most applications is to have one sketching procedure that works for sets of all sizes. Therefore, filling out these empty entries is the subject of several follow-up papers initiated by Shrivastava and Li [ICML'14]. However, these "densification" schemes fail to provide good concentration bounds exactly in the case A=O(t)|A| = O(t), where they are needed. (continued...

    Practical Hash Functions for Similarity Estimation and Dimensionality Reduction

    Full text link
    Hashing is a basic tool for dimensionality reduction employed in several aspects of machine learning. However, the perfomance analysis is often carried out under the abstract assumption that a truly random unit cost hash function is used, without concern for which concrete hash function is employed. The concrete hash function may work fine on sufficiently random input. The question is if it can be trusted in the real world when faced with more structured input. In this paper we focus on two prominent applications of hashing, namely similarity estimation with the one permutation hashing (OPH) scheme of Li et al. [NIPS'12] and feature hashing (FH) of Weinberger et al. [ICML'09], both of which have found numerous applications, i.e. in approximate near-neighbour search with LSH and large-scale classification with SVM. We consider mixed tabulation hashing of Dahlgaard et al.[FOCS'15] which was proved to perform like a truly random hash function in many applications, including OPH. Here we first show improved concentration bounds for FH with truly random hashing and then argue that mixed tabulation performs similar for sparse input. Our main contribution, however, is an experimental comparison of different hashing schemes when used inside FH, OPH, and LSH. We find that mixed tabulation hashing is almost as fast as the multiply-mod-prime scheme ax+b mod p. Mutiply-mod-prime is guaranteed to work well on sufficiently random data, but we demonstrate that in the above applications, it can lead to bias and poor concentration on both real-world and synthetic data. We also compare with the popular MurmurHash3, which has no proven guarantees. Mixed tabulation and MurmurHash3 both perform similar to truly random hashing in our experiments. However, mixed tabulation is 40% faster than MurmurHash3, and it has the proven guarantee of good performance on all possible input.Comment: Preliminary version of this paper will appear at NIPS 201

    Sublinear Distance Labeling

    Get PDF
    A distance labeling scheme labels the nn nodes of a graph with binary strings such that, given the labels of any two nodes, one can determine the distance in the graph between the two nodes by looking only at the labels. A DD-preserving distance labeling scheme only returns precise distances between pairs of nodes that are at distance at least DD from each other. In this paper we consider distance labeling schemes for the classical case of unweighted graphs with both directed and undirected edges. We present a O(nDlog2D)O(\frac{n}{D}\log^2 D) bit DD-preserving distance labeling scheme, improving the previous bound by Bollob\'as et. al. [SIAM J. Discrete Math. 2005]. We also give an almost matching lower bound of Ω(nD)\Omega(\frac{n}{D}). With our DD-preserving distance labeling scheme as a building block, we additionally achieve the following results: 1. We present the first distance labeling scheme of size o(n)o(n) for sparse graphs (and hence bounded degree graphs). This addresses an open problem by Gavoille et. al. [J. Algo. 2004], hereby separating the complexity from distance labeling in general graphs which require Ω(n)\Omega(n) bits, Moon [Proc. of Glasgow Math. Association 1965]. 2. For approximate rr-additive labeling schemes, that return distances within an additive error of rr we show a scheme of size O(nrpolylog(rlogn)logn)O\left ( \frac{n}{r} \cdot\frac{\operatorname{polylog} (r\log n)}{\log n} \right ) for r2r \ge 2. This improves on the current best bound of O(nr)O\left(\frac{n}{r}\right) by Alstrup et. al. [SODA 2016] for sub-polynomial rr, and is a generalization of a result by Gawrychowski et al. [arXiv preprint 2015] who showed this for r=2r=2.Comment: A preliminary version of this paper appeared at ESA'1

    Power of dd Choices with Simple Tabulation

    Get PDF
    Suppose that we are to place mm balls into nn bins sequentially using the dd-choice paradigm: For each ball we are given a choice of dd bins, according to dd hash functions h1,,hdh_1,\dots,h_d and we place the ball in the least loaded of these bins breaking ties arbitrarily. Our interest is in the number of balls in the fullest bin after all mm balls have been placed. Azar et al. [STOC'94] proved that when m=O(n)m=O(n) and when the hash functions are fully random the maximum load is at most lglgnlgd+O(1)\frac{\lg \lg n }{\lg d}+O(1) whp (i.e. with probability 1O(nγ)1-O(n^{-\gamma}) for any choice of γ\gamma). In this paper we suppose that the h1,,hdh_1,\dots,h_d are simple tabulation hash functions. Generalising a result by Dahlgaard et al [SODA'16] we show that for an arbitrary constant d2d\geq 2 the maximum load is O(lglgn)O(\lg \lg n) whp, and that expected maximum load is at most lglgnlgd+O(1)\frac{\lg \lg n}{\lg d}+O(1). We further show that by using a simple tie-breaking algorithm introduced by V\"ocking [J.ACM'03] the expected maximum load drops to lglgndlgφd+O(1)\frac{\lg \lg n}{d\lg \varphi_d}+O(1) where φd\varphi_d is the rate of growth of the dd-ary Fibonacci numbers. Both of these expected bounds match those of the fully random setting. The analysis by Dahlgaard et al. relies on a proof by P\u{a}tra\c{s}cu and Thorup [J.ACM'11] concerning the use of simple tabulation for cuckoo hashing. We need here a generalisation to d>2d>2 hash functions, but the original proof is an 8-page tour de force of ad-hoc arguments that do not appear to generalise. Our main technical contribution is a shorter, simpler and more accessible proof of the result by P\u{a}tra\c{s}cu and Thorup, where the relevant parts generalise nicely to the analysis of dd choices.Comment: Accepted at ICALP 201
    corecore